<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/16 0016
 * Time: 15:59
 */
use yii\helpers\Html;
use yii\helpers\Url;

?>
<div class="col-md-2">
    <div class="list-group">
        <?php
        $items = [
            [
                'title' => '文章管理',
                'url' => ['/post/admin'],
            ],
            [
                'title' => '文章类型',
                'url' => ['/category/index'],
            ],
            [
                'title' => '用户管理',
                'url' => ['/user/index'],
            ],
            [
                'title' => '微信管理',
                'url' => ['/weixin/index'],
            ],
            [
                'title' => '系统设置',
                'url' => ['/system/index'],
            ],
        ];

        foreach ($items as $item) {
            echo Html::a($item['title'], $item['url'], [
                'class' => 'list-group-item' . ('/' . $this->context->route === Url::to($item['url']) ? ' active ' : ''),
            ]);
        }

        ?>
    </div>
</div>
